import { IQuestionForm, AddUserFrom } from '@/utils/interface';
import { request } from 'umi';

// 获取试题列表
<<<<<<< HEAD
export function getQuestionType(){
=======
export function getQuestionType() {
>>>>>>> sxh
  return request('/exam/getQuestionsType');
}

// 获取所有课程
<<<<<<< HEAD
export function getExamSubject(){
=======
export function getExamSubject() {
>>>>>>> sxh
  return request('/exam/subject');
}

// 获取所有考试类型
<<<<<<< HEAD
export function getExamType(){
  return request('/exam/examType');
}
// 添加试题
export function submitQuestion(data: IQuestionForm){
=======
export function getExamType() {
  return request('/exam/examType');
}

//第一个页面
export function getNoone() {
  return request('/exam/getQuestionsType');
}

//获取考试类型
export function getExamType1() {
  return request('/exam/getQuestionsType');
}

//考试管理  试卷列表
export function getExamShilist() {
  return request('/exam/exam');
}

//获取所有的试题
export function getExamText() {
  return request('/exam/questions/new')
}

// 添加试题
export function submitQuestion(data: IQuestionForm) {
>>>>>>> sxh
  return request('/exam/questions', {
    method: 'POST',
    data
  })
<<<<<<< HEAD
<<<<<<< HEAD
}
=======
}
>>>>>>> sxh
=======
}


//获取已经分配教室的班级
export function useGrade() {
  return request('/manger/grade');
}

//删除指定试题类型
export function delQuestionsType(id: any) {
  return request('/exam/delQuestionsType', {
    method: 'POST',
    id
  })
}



//展示用户数据
export function userData() {
  return request('/user/user');
}
//展示身份数据
export function userAdmin() {
  return request('/user/identity')
}
//展示api接口权限
export function getApi() {
  return request('/user/api_authority')
}
//展示身份和api权限关系
export function getIdapi() {
  return request('/user/identity_api_authority_relation')
}
//获取视图权限数据
export function getView() {
  return request('/user/view_authority')
}
//身份和视图权限关系
export function getViewApi() {
  return request('/user/identity_view_authority_relation')
}




//添加用户
<<<<<<< HEAD
export function addUser(data: AddUserFrom) {
    return request('/user', {
      method: 'POST',
      data,
    });
  }
  
>>>>>>> sxh
=======
export function addUser(data: AddUserFrom) {
  return request('/user', {
    method: 'POST',
    data,
  });
}

>>>>>>> sxh
